package com.gitee.chili.leisure.config;

import feign.Contract;
import feign.codec.Decoder;
import feign.codec.Encoder;
import feign.jackson.JacksonDecoder;
import feign.jackson.JacksonEncoder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * FeignDefaultConfiguration
 *
 * @author week solider
 * @version v1.0
 * @since 01.09.2020
 */
@Configuration
public class FeignDefaultConfiguration extends FeignConfiguration {

    @Bean
    public Decoder decoder() {
        return new JacksonDecoder();
    }

    @Bean
    public Encoder encoder(){
        return new JacksonEncoder();
    }

    @Bean
    public Contract feignDefaultContract() {
        return new feign.Contract.Default();
    }
}
